CC=gcc
CFLAGS=-Wall -g3
LFLAGS=-L../lib
IFLAGS=-I../include
INSTALL_DIR=../../../../bin/monitor/server/


all:communicator

communicator:communicator.o
	$(CC) -o $@ $< $(CFLAGS) $(LFLAGS) $(IFLAGS) -lreadconf -lhostmap

%.o:%.c
	$(CC) -c -o $@ $< $(CFLAGS) $(LFLAGS) $(IFLAGS)

install:
	cp communicator $(INSTALL_DIR)

clean:
	rm -rf communicator *.o *~
	cd $(INSTALL_DIR) ; rm -rf communicator
